package com.cody.service.impl;

import com.cody.dao.TeacherDao;
import com.cody.entity.Teacher;
import com.cody.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Cody
 * @date 2021/4/7 - 20:26
 */
@Service
public class TeacherServiceImpl implements TeacherService {
    @Autowired
    TeacherDao teacherDao;

    @Override
    public List<Teacher> queryAllTeacher() {
        return teacherDao.queryAllTeacher();
    }

    @Override
    public Teacher querySingleTeacher(String teaName, String teaPassword) {
        return teacherDao.querySingleTeacher(teaName,teaPassword);
    }

    @Override
    public Teacher querySingleTeacherByTeacherNumber(String teacherNumber) {
        return teacherDao.querySingleTeacherByTeacherNumber(teacherNumber);
    }

    @Override
    public boolean insertSingleTeacher(Teacher teacher) {

        return teacherDao.insertSingleTeacher(teacher);
    }

    @Override
    public boolean updateTeacherInfo(Teacher teacher) {
        return teacherDao.updateTeacherInfo(teacher);
    }

    @Override
    public List<Teacher> queryTeacherByKeyword(String keyword) {
        return teacherDao.queryTeacherByKeyword(keyword);
    }

    @Override
    public boolean updateTeacherPwd(String teacherNumber,String teacherPassword) {
        return teacherDao.updateTeacherPwd(teacherNumber,teacherPassword);
    }

    @Override
    public boolean delTeacherByTeacherId(Integer teacherId) {
        return teacherDao.delTeacherByTeacherId(teacherId);
    }

}
